package Command;

import java.util.ArrayList;

import Server.Command;
import Server.cmdArguments;

public class ListCommand implements Command{

	private cmdArguments args;

	@Override
	public String execute() {
		ArrayList<Integer> list = args.bst.getSeqList();
		String result="";
		for(Integer i: list){
			result += i+", ";
		}
		return result;
	}

	@Override
	public String undo() {		
		return "The request for a list can't be undone, please try again";
	}

	@Override
	public void setArgs(cmdArguments args) {
		this.args = args;		
	}

}
